<!DOCTYPE html>
<html
  layout:decorator="components/layout"
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
>
<head>
  <title>系统日志列表</title>
</head>
<body>
<div
  layout:fragment="content"
  id="app" v-cloak
>
  <!--引入边框角-->
  <div class="container">

    <div class="myHeader">
      <div class="myHeader-title">
        系统日志列表
      </div>
      <div class="myHeader-tool">
        <el-form inline>
          <el-form-item label="级别:">
            <el-select v-model="form.level" @change="searchPage" placeholder="请选择" size="mini" clearable>
              <el-option v-for="(val,key) in levelList" :key="key" :label="val"
                         :value="key">
              </el-option>
            </el-select>
          </el-form-item>

          <el-form-item label="发生时间:">
            <el-date-picker
              v-model="form.timeArray"
              @change="timeChange"
              type="datetimerange"
              size="mini"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :default-time="['00:00:00', '23:59:59']"
            >
            </el-date-picker>
          </el-form-item>

        </el-form>

      </div>
    </div>

    <!--内容-->
    <my-table
      :data="page.records"
      :columns="columns"
      @handle-selection-change="selection"
    >

      <template #level="scope">
        <span>
          <img
            :src="imgUrl(scope.row.level)"
            align="absmiddle"
          >
          {{levelList[scope.row.level]}}
        </span>
      </template>

      <template #operating="scope">
			<span>
        <el-button size="mini" type="primary" @click.stop.prevent="() => viewInfo(scope.row)"></el-button>
			</span>
      </template>
    </my-table>
    <div class="pagination">
      <el-pagination
        background
        @size-change="changeSize"
        @current-change="goto"
        :current-page="page.current"
        :page-sizes="[10, 20, 30]"
        :page-size="page.size"
        layout="total, sizes, prev, pager, next, jumper"
        :total="page.total"
      >
      </el-pagination>
    </div>
  </div>
</div>
<div layout:fragment="js">
  <script src="/static/js/module/tlog/model/TlogSystem.js"></script>
  <script src="/static/js/module/tlog/api/tlogSystemApi.js"></script>
  <script src="/static/js/module/tlog/admin_security_sysloglist.js"></script>
</div>
</body>
</html>
